package com.controller;

import com.service.IAdminService;
import com.service.impl.UserServiceImpl;
import com.vo.Result;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("//admin")
public class AdminController {
    @Resource
    public IAdminService adminService;
    private Logger logger= LoggerFactory.getLogger( UserServiceImpl.class );

    @RequestMapping("/login")
    public Result login(@RequestParam("phone") String phone, @RequestParam("password") String password){
        Result result=adminService.login(phone,password);
        return result ;
    }
}
